package com.codenesia.cnzine;

import java.util.ArrayList;

import com.codenesia.adapter.CustomSubGridView;
import com.codenesia.model.Item;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.GridView;

public class HomeFragment extends Fragment {
	GridView grid;
	ArrayList<Item> gridArray = new ArrayList<Item>();

	public HomeFragment() {
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {

		View rootView = inflater.inflate(R.layout.fragment_home, container,
				false);

		return rootView;

	}

	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onActivityCreated(savedInstanceState);
		// for (int i = 0; i < 10; i++) {
		// gridArray.add(new Item(R.drawable.samples));
		//
		// }
		// grid = (GridView) getActivity().findViewById(R.id.gridView1);
		// CustomSubGridView custom = new CustomSubGridView(getActivity(),
		// R.layout.row_home, gridArray);
		// grid.setAdapter(custom);
	}
}
